﻿using BCEntity.MakeStaticPagingComponent.WebsiteTemplate;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.MakeStaticPagingComponent.WebsiteTemplate
{
    /// <summary>
    /// 网站模板数据处理接口
    /// </summary>
    public interface IWebsiteTemplateData
    {
        /// <summary>
        /// 检查网站模板信息是否存在
        /// </summary>
        /// <param name="templateName">模板名称</param>
        /// <returns></returns>
        bool CheckWebsiteTemplateExists(string templateName);
        /// <summary>
        /// 检查网站模板信息是否存在
        /// </summary>
        /// <param name="websiteTemplateId">模板Id</param>
        /// <returns></returns>
        bool CheckWebsiteTemplateExists(int websiteTemplateId);
        /// <summary>
        /// 添加网站模板信息
        /// </summary>
        /// <param name="websiteTemplateEntity">网站模板信息</param>
        /// <returns></returns>
        WebsiteTemplateEntity Add(WebsiteTemplateEntity websiteTemplateEntity);

        /// <summary>
        /// 更新网站模板信息
        /// </summary>
        /// <param name="websiteTemplateEntity">网站模板信息</param>
        /// <returns></returns>
        WebsiteTemplateEntity Update(WebsiteTemplateEntity websiteTemplateEntity);
        /// <summary>
        /// 获取已使用网站模板信息
        /// </summary>
        /// <returns></returns>
        WebsiteTemplateEntity GetUsed();
        /// <summary>
        /// 获取网站模板信息
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <returns></returns>
        WebsiteTemplateEntity Get(int websiteTemplateId);
        /// <summary>
        /// 获取网站模板信息
        /// </summary>
        /// <param name="tagName">标签名称</param>
        /// <returns></returns>
        WebsiteTemplateEntity Get(string templateName);
        /// <summary>
        /// 获取网站模板信息列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<WebsiteTemplateEntity> Get();
        /// <summary>
        /// 获取网站模板信息列表
        /// </summary>      
        /// <param name="templateName">模板名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="minPrice">最低价格</param>
        /// <param name="maxPrice">最高价格</param>
        /// <param name="sortField">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="dataCount">数据总数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        IEnumerable<WebsiteTemplateEntity> Get(string templateName, decimal? minPrice, decimal? maxPrice, DateTime? start, DateTime? end, string sortField, bool? ascending, out int dataCount, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 设置网站模板为已使用
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <returns></returns>
        bool UpdateWebsiteTemplateIsUsed(int websiteTemplateId);

        /// <summary>
        /// 删除网站模板
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <returns></returns>
        void delete(int websiteTemplateId);

    }
}
